package com.aree.caipiao.shsq.chain;

import com.aree.caipiao.shsq.model.ShuangSeQiuNumbers;
/**
 * 和值过滤器,过滤出和值在指定区间（含）的选号
 * @author hp-pc
 *
 */
public class HezhiChooseChain extends ChooseChain {
	private int s = 0;//小端
	private int l = 0;//大端
	
	/**
	 * 和值在[s, l]之间
	 * @param s
	 * @param l
	 */
	public HezhiChooseChain(int s, int l) {
		this.s = s;
		this.l = l;
	}
	
	/* (non-Javadoc)
	 * @see com.aree.caipiao.shsq.chain.ChooseChain#isWanted(com.aree.caipiao.shsq.model.ShuangSeQiuNumbers)
	 */
	@Override
	public boolean isWanted(ShuangSeQiuNumbers numbers) {
		int he = numbers.getHe();
		if (this.s <= he && he <= this.l) return true;
		return false;
	}
}
